package com.hsc.yalebao.weight.viewpager;

import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import java.util.ArrayList;
import java.util.List;

public class ViewPagerAdapter extends PagerAdapter
{
  private List<ImageView> list = new ArrayList();
  private OnItemClickListener onItemClickListener;

  public ViewPagerAdapter(List<ImageView> paramList, OnItemClickListener paramOnItemClickListener)
  {
    this.list = paramList;
    this.onItemClickListener = paramOnItemClickListener;
  }

  public void destroyItem(ViewGroup paramViewGroup, int paramInt, Object paramObject)
  {
    paramViewGroup.removeView((View)paramObject);
  }

  public int getCount()
  {
    return this.list.size();
  }

  public Object instantiateItem(ViewGroup paramViewGroup, final int paramInt)
  {
    ImageView localImageView = (ImageView)this.list.get(paramInt);
    if (this.onItemClickListener != null)
      localImageView.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          ViewPagerAdapter.this.onItemClickListener.onItemClick(paramInt);
        }
      });
    paramViewGroup.addView(localImageView);
    return localImageView;
  }

  public boolean isViewFromObject(View paramView, Object paramObject)
  {
    return paramView == paramObject;
  }

  public static abstract interface OnItemClickListener
  {
    public abstract void onItemClick(int paramInt);
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.weight.viewpager.ViewPagerAdapter
 * JD-Core Version:    0.6.2
 */